<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>加入愿望清单</title>
<link href="<%=path %>/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<%=path %>/js/jquery.js"></script>
<script type="text/javascript">
	$(document).ready(function() {
		$("#tablist").hide();
	});
</script>
<style>
.select {
	height: 36px;
	padding-left: 15px;
	width: 285px;
	border: solid 1px #ced9df;
}
</style>
</head>
<body>
	<div class="place">
		<span>位置：</span>
		<ul class="placeul">
			<li><a style="text-decoration:underline;" href="sysadmin/index.jsp">首页</a></li>
			<li><a href="#">亚马逊代购管理</a></li>
			<li><a href="#">加入愿望清单</a></li>
		</ul>
	</div>

	<div class="rightinfo">

		<div class="tools">
			<form action="<%=path%>/hope.do?m=userSearch" id="fm" method="post">
				<ul class="toolbar">
					<!-- <li style="background:#F4D27F;padding-left: 10px; width:136px;text-align: center;" onclick="location.href='hope.jsp'">&nbsp;&nbsp;新增加入愿望清单&nbsp;<img
						src="images/t01.png" style="vertical-align: middle;" /></li> -->
					<!--<li class="click"><span><img src="images/t02.png" /></span>修改</li>
					<li><span><img src="images/t03.png" /></span>删除</li>
					<li><span><img src="images/t04.png" /></span>统计</li> -->
				</ul>
				&nbsp;&nbsp;
				<input type="radio" id="rdo1" name="orderState" value="" checked="checked" />全部&nbsp;&nbsp;&nbsp; 
				<input type="radio" id="rdo2" name="orderState" value="2" />已审核&nbsp;&nbsp;&nbsp;
				<input type="radio" id="rdo3" name="orderState" value="1" />未审核&nbsp;&nbsp;&nbsp;
					<!-- 	<input type="radio" name="rdo"/>已完成的订单&nbsp;&nbsp; -->
				
				<input type="text" name="key" value="${key }" class="dfinput" placeholder="请输入事务编码或者ASIN或者中文品名"/>
				<img onclick="s()"  src="<%=path %>/images/search1.png" style="vertical-align: middle;" width="30" height="30" />
				
				<input type="hidden" name="order_type" value="${param.order_type }" />
				<!-- <input type="button" class="btn" value="查询任务"  style="background:#F4D27F;color:#000000;font-weight:normal;font-family: 微软雅黑;"/> -->
			</form>
		</div>

		<table class="usertablelist" id="tabpay">
			<thead>
				<tr>
					<th>事务编号</th>
					<th>ASIN</th>
					<th>加入愿望清单数量</th>
					<th>中文品名</th>
					<th>总手续费</th>
					<th>总支付金额</th>
					<th>订单状态</th>
					<th style="text-align: center;">操作</th>
				</tr>
			</thead>
			<tbody>
			 	<c:forEach items="${adminInfo }" var="item">

					<!-- 加入愿望清单超级链接总数量 -->
					<c:set
						value="${item.wish_url_one_day + item.wish_url_two_day + item.wish_url_three_day 
							+ item.wish_url_four_day + item.wish_url_five_day + item.wish_url_six_day 
							+ item.wish_url_seven_day + item.wish_url_eight_day + item.wish_url_nine_day 
							+ item.wish_url_ten_day }"
						var="wishUrl"></c:set>
					<!-- 加入愿望清单搜索结果总数量 -->
					<c:set
						value="${item.wish_result_one_day + item.wish_result_two_day + item.wish_result_three_day 
							+ item.wish_result_four_day + item.wish_result_five_day + item.wish_result_six_day 
							+ item.wish_result_seven_day + item.wish_result_eight_day + item.wish_result_nine_day 
							+ item.wish_result_ten_day }"
						var="wishResult"></c:set>
					<tr>
						<td><a style="text-decoration: underline;"
							href="hope.do?m=view&orderNo=${item.orderNo }&type=1&order_type=${param.order_type }">${item.orderNo }</a></td>
						<td>${item.asin }</td>
						<td>${wishUrl + wishResult}</td>
						<td>${item.pro_name }</td>
						<td>${item.procedureNum}</td>
						<td>${item.payNum }</td>
						<td>
							<c:choose>
								<c:when test="${item.orderState == 1}">
									<font style="color: red; font-weight: bold;">未审核</font>
								</c:when>
								<c:otherwise>
									<font style="color: green; font-weight: bold;">已审核</font>
								</c:otherwise>
							</c:choose>
						</td>
						<td>
							<c:choose>
								<c:when test="${item.orderState == 1}">
									<a href="hope.do?m=check&orderNo=${item.orderNo }&order_type=${param.order_type }"
										class="tablelink">【审核】</a>
								</c:when>
								<c:otherwise>
									<a href="hope.do?m=view&orderNo=${item.orderNo }&type=1&order_type=${param.order_type }"
										class="tablelink">【查看】</a>
								</c:otherwise>
							</c:choose>
						</td>

					</tr>
				</c:forEach>
			</tbody>
		</table>



		<jsp:include page="../common/homepage.jsp" flush="true">
				<jsp:param value="hope.do?m=adminInfo" name="action" />
		</jsp:include>

		<div class="tip">
			<div class="tiptop">
				<span>提示信息</span><a></a>
			</div>

			<div class="tipinfo">
				<span><img src="images/ticon.png" /></span>
				<div class="tipright">
					<p>是否确认对信息的修改 ？</p>
					<cite>如果是请点击确定按钮 ，否则请点取消。</cite>
				</div>
			</div>

			<div class="tipbtn">
				<input name="" type="button" class="sure" value="确定" />&nbsp; <input
					name="" type="button" class="cancel" value="取消" />
			</div>

		</div>

	</div>

	<script type="text/javascript">
	$('.tablelist tbody tr:odd').addClass('odd');
	var rdo1 = $("#rdo1");
	var rdo2 = $("#rdo2");
	var rdo3 = $("#rdo3");
	$(function() {

		$(".btn").click(function() {

			if (rdo1.attr("checked")) {
				location.href = 'hope.do?m=adminInfo&order_type=7&orderState=';
			} else if (rdo2.attr("checked")) {
				location.href = 'hope.do?m=adminInfo&order_type=7&orderState=2';
			} else {
				location.href = 'hope.do?m=adminInfo&order_type=7&orderState=1';
			}
		});

		var orderState = '${param.orderState}';
		if (orderState == "") {

			rdo1.attr("checked", "checked");
		} else if (orderState == 2) {

			rdo2.attr("checked", "checked");
		} else {

			rdo3.attr("checked", "checked");
		}
		rdo1.click(function() {
			search();
		});
		rdo2.click(function() {
			search();
		});
		rdo3.click(function() {
			search();
		});

	});

	function search() {
		if (rdo1.attr("checked")) {
			location.href = 'hope.do?m=adminInfo&order_type=7&orderState=';
		} else if (rdo2.attr("checked")) {
			location.href = 'hope.do?m=adminInfo&order_type=7&orderState=2';
		} else {
			location.href = 'hope.do?m=adminInfo&order_type=7&orderState=1';
		}
	}
	function s() {
		$("#fm").submit();
	}
	</script>

</body>
</html>